# -*- coding: utf-8 -*-
"""
Created on Thu Sep 24 16:17:13 2015

@author: Sirius_wu
"""

from matplotlib import pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = Axes3D(fig)
X = np.arange(-4, 4, 0.25)
Y = np.arange(-4, 4, 0.25)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)

# 具体函数方法可用 help(function) 查看，如：help(ax.plot_surface)
ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap='rainbow')

plt.show()

# import matplotlib.pyplot as plt  
# import numpy as np  
# beita = 1  
# gama = 0.5  
# x = np.linspace(0, 4, 1000)  
# xx = x*9.8*0.6  
# OH = (0.33/(1-0.33)+beita)*(14.12-0.73*4.68)+0.73*4.68  
# Oh = (0.33/(1-0.33)+gama)*(14.12-0.73*4.68)+0.73*4.68  
# Or = 0.946*xx+0.25272  
# Osita = 3*OH-Oh-xx*0.683552239-1.481  
# Oz = 12.639+0.66*(OH-Oh)+0.316447761*xx  
# plt.figure(figsize=(8, 8))  
# plt.plot(x, Or, color="red")  
# plt.plot(x, Osita, color="blue")  
# plt.plot(x, Oz, color="green")  
# plt.xlabel(u'\u03c1'+" (g/cm^3)", fontproperties='SimHei', fontsize=18)  
# plt.ylabel(u'\u03c3'+" (Mpa)", fontproperties='SimHei', fontsize=18)  
# plt.show()  